package com.ruoyi.lock.service.impl;

import com.ruoyi.lock.domain.SysSetting;
import com.ruoyi.lock.mapper.SysSettingMapper;
import com.ruoyi.lock.service.ISysSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 系统设置Service业务层处理
 * 
 * @author arvin
 * @date 2025-03-20
 */
@Service
public class SysSettingServiceImpl implements ISysSettingService 
{
    @Autowired
    private SysSettingMapper sysSettingMapper;

    /**
     * 查询系统设置
     * 
     * @param deptId 系统设置主键
     * @return 系统设置
     */
    @Override
    public SysSetting selectSysSettingByDeptId(Long deptId)
    {
        return sysSettingMapper.selectSysSettingByDeptId(deptId);
    }

    @Override
    public SysSetting selectSysSettingByCellId(Long cellId) {
        return sysSettingMapper.selectSysSettingByCellId(cellId);
    }

    /**
     * 查询系统设置列表
     * 
     * @param sysSetting 系统设置
     * @return 系统设置
     */
    @Override
    public List<SysSetting> selectSysSettingList(SysSetting sysSetting)
    {
        return sysSettingMapper.selectSysSettingList(sysSetting);
    }

    /**
     * 新增系统设置
     * 
     * @param sysSetting 系统设置
     * @return 结果
     */
    @Override
    public int insertSysSetting(SysSetting sysSetting)
    {
        return sysSettingMapper.insertSysSetting(sysSetting);
    }

    /**
     * 修改系统设置
     * 
     * @param sysSetting 系统设置
     * @return 结果
     */
    @Override
    public int updateSysSetting(SysSetting sysSetting)
    {
        return sysSettingMapper.updateSysSetting(sysSetting);
    }

    /**
     * 批量删除系统设置
     * 
     * @param deptIds 需要删除的系统设置主键
     * @return 结果
     */
    @Override
    public int deleteSysSettingByDeptIds(Long[] deptIds)
    {
        return sysSettingMapper.deleteSysSettingByDeptIds(deptIds);
    }

    /**
     * 删除系统设置信息
     * 
     * @param deptId 系统设置主键
     * @return 结果
     */
    @Override
    public int deleteSysSettingByDeptId(Long deptId)
    {
        return sysSettingMapper.deleteSysSettingByDeptId(deptId);
    }
}
